__author__ = 'Byron'
import unittest
import dslrFactory
import DOFCalc

class testFactory(unittest.TestCase):
    def test_choiceX7(self):
        #make sure that the factory contains muliple cameras with simular names that are not overlaping
            element = dslrFactory.createDslr("Canon EOS Kiss X7i","canon")
            unittest.assertTrue(element in self.seg)

    def test_choiceX5(self):
            element = dslrFactory.createDslr("Canon EOS Kiss X5","canon")
            unittest.assertTrue(element in self.seg)

    def test_choiceMark3(self):
            element = dslrFactory.createDslr("Canon EOS 5D Mark III","canon")
            unittest.assertTrue(element in self.seg)

    def test_choiceMark2(self):
            element = dslrFactory.createDslr("Canon EOS 5D Mark II","canon")
            unittest.assertTrue(element in self.seg)

    def test_choice60D(self):
            element = dslrFactory.createDslr("Canon EOS 60D","canon")
            unittest.assertTrue(element in self.seg)

    def test_choice60DA(self):
            element = dslrFactory.createDslr("Canon EOS 60Da","canon")
            unittest.assertTrue(element in self.seg)

#black box tests

class OutcomesTest(unittest.TestCase):

#test to see if the dof cal

    #see if it returns a true if valid input is entered
    def test_pass(self):
        unittest.assertTrue(True).DOFCalc.calculateDOF(0.019948, "50", "3.048", "2.8")

    #see if the calculator returns false if invalid input is entered
    def test_fail(self):
        unittest.assertFalse(False).DOFCalc.calculateDOF(0.019948, "zardoz", "3.048", 2.8)